﻿package  {
	import flash.events.Event;
	import flash.display.MovieClip;
	
	public class SinGraphClass extends MovieClip{
		
		private var rot:Number = 0;
		private var SIN:Number = 0;
		private var amp:Number = 46;
		
		public function SinGraphClass() {			
			this.graphics.lineStyle(10, Math.random()*0xFFFFFF);
			this.graphics.moveTo(0,0);
			addEventListener(Event.ENTER_FRAME, update);
		}
		
		public function update(e:Event):void{
			rot+=.1;
			SIN = Math.sin(rot);
			this.graphics.lineTo(rot*amp, SIN*amp);
			amp -=.1;
		}

	}
	
}
